using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GetOtherScript : MonoBehaviour
{
    // Start is called before the first frame update
    private void Start()
    {
        // 通过名称获取 
        TestSetEnable temp = this.GetComponent("TestSetEnable") as TestSetEnable;
        Debug.Log("获取脚本1" + temp);

        // 获取不存在的脚本, 获取到的是null
        TestSetEnable temp1 = this.GetComponent("TestSetEnable2323232") as TestSetEnable;
        Debug.Log("获取脚本2" + temp1);

        int[] arr1 = { 1, 2, 3, 4 };

        Debug.Log(string.Join(",", arr1));
        ArrayUtil.Swap(arr1);
    }

    // Update is called once per frame
    private void Update()
    {
    }
}